﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.actions {
    import Classes.*;

    public class ActionEnableFreedom extends NPCAction {

        protected var m_isFreeAgent:Boolean;
        protected var m_reset:Boolean;

        public function ActionEnableFreedom(_arg1:NPC, _arg2:Boolean, _arg3:Boolean=false){
            super(_arg1);
            this.m_isFreeAgent = _arg2;
            this.m_reset = _arg3;
        }
        override public function update(_arg1:Number):void{
            super.update(_arg1);
            m_npc.isFreeAgent = this.m_isFreeAgent;
            if (this.m_reset){
                m_npc.getStateMachine().removeAllStates();
            } else {
                m_npc.getStateMachine().removeState(this);
            };
        }

    }
}//package Classes.actions 
